package test0604.demo.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 描述  :
 * 创建人:    Wzy
 * 创建时间: 2020-06-04  23:35
 */
@Configuration
public class ELClientConfig {
    @Bean
    public RestHighLevelClient restHighLevelClient() {

        RestHighLevelClient client = new RestHighLevelClient(
                RestClient.builder
                        (new HttpHost("192.168.116.128", 9200, "http")));
        return client;
        

    }
}
